using NewFormatProject.Infrastructure.EFCore;
using NewFormatProject.Infrastructure.Dto.Requests.Objects;
namespace NewFormatProject.Server.Instances.Extends.Requests
{
	public static class EntityActionLogsExtend
{
		public static ActionLogs ToEntity(this RequestActionLogsDto dto)
		{
			return new ActionLogs
			{
				AlId = dto.id,
				AlMessage = dto.message,
				AlRequestParams = dto.requestParams,
				AlRequestUrl = dto.requestUrl,
				AlRequestMethod = dto.requestMethod,
				AlIp = dto.ip,
				AlAffectedRows = dto.affectedRows,
				AlUserId = dto.userId,
			};
		}
	}
}
